import { getToken } from '@/utils/token'
import { getRole } from '@/utils/role'
import { getMenu } from '@/utils/menu'
import { getName } from '@/utils/name'
import { getPath } from '@/utils/path'

export default{
    token:({ login }) => login.token || getToken(),
    role:({ login }) => login.role || getRole(),
    menu:({login}) => {
        return login.menu.length==0? getMenu() : login.menu
     },
    uname:({login}) => login.uname || getName(),
    path:() => getPath() || '/home/pages'
}